package cn.yomigaeri.signal.controller;

import cn.yomigaeri.common.entity.dto.SignalDTO;
import cn.yomigaeri.common.result.Result;
import cn.yomigaeri.signal.service.UploadSignalService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: UploadSignalController
 * @Package: cn.yomigaeri.signal.controller
 * @Description:
 * @Author Yomigaeri
 * @Create 2025/6/4 16:02
 * @Version 1.0
 */
@RestController
@RequiredArgsConstructor
public class UploadSignalController {
    private final UploadSignalService uploadSignalService;
    @PostMapping("/api/upload/signal")
    public Result uploadSignal(@RequestBody SignalDTO signalDTO) {
        uploadSignalService.uploadAndSave(signalDTO);
        return Result.success();
    }

}
